import type { EChartsOption } from 'echarts'
import * as echarts from 'echarts/core'

export function getLeftOption(): EChartsOption {
  return  {
    series: [{
      name: '第一个圆环',
      type: 'pie',
      radius: [65, 45],
      center: ['15%', '50%'],
      label:{
        show:false
      },
      data: [{
        value: 70,
        label: {
          rich: {
            a: {
              color: '#5fba79',
              align: 'center',
              fontSize: 18,
              fontWeight: "bold"
            },
            b: {
              color: '#fff',
              align: 'center',
              fontSize: 14
            }
          },
          formatter: function (params) {
            return "{b|计划}\n\n" + "{a|" + params.value + "台}" + "\n\n{b|2%}";
          },
          position: 'center',
          show: true,
          fontSize: '15',
          fontWeight: 'normal',
          color: '#fff'
        },
        itemStyle: {
          color: '#5FB878',
          shadowColor: '#5FB878',
          shadowBlur: 0
        }
      }, {
        value: 75,
        name: 'invisible',
        itemStyle: {
          color: '#E1E8EE',
        }
      }]
    }, {
      name: '第二个圆环',
      type: 'pie',
      radius: [65, 45],
      center: ['50%', '50%'],
      label:{
        show:false
      },
      data: [{
        value: 24,
        label: {
          rich: {
            a: {
              color: '#01AAED',
              align: 'center',
              fontSize: 18,
              fontWeight: "bold"
            },
            b: {
              color: '#fff',
              align: 'center',
              fontSize: 14
            }
          },
          formatter: function (params) {
            return "{b|计划}\n\n" + "{a|" + params.value + "台}" + "\n\n{b|2%}";
          },
          position: 'center',
          show: true,
          fontSize: '14',
          fontWeight: 'normal',
          color: '#fff'
        },
        itemStyle: {
          color: '#01AAED',
          shadowColor: '#01AAED',
          shadowBlur: 0
        }
      }, {
        value: 50,
        name: 'invisible',
        itemStyle: {
          color: '#E1E8EE'
        }
      }]
    }, {
      name: '第三个圆环',
      type: 'pie',
      radius: [65, 45],
      center: ['85%', '50%'],
      label:{
        show:false
      },
      data: [{
        value: 11,
        label: {
          rich: {
            a: {
              color: '#FF5722',
              align: 'center',
              fontSize: 18,
              fontWeight: "bold"
            },
            b: {
              color: '#fff',
              align: 'center',
              fontSize: 14
            }
          },
          formatter: function (params) {
            return "{b|停机}\n\n" + "{a|" + params.value + "台}" + "\n\n{b|2%}";
          },
          position: 'center',
          show: true,
          fontSize: '14',
          fontWeight: 'normal',
          color: '#fff'
        },
        itemStyle: {
          color: '#FF5722',
          shadowColor: '#FF5722',
          shadowBlur: 0
        }
      }, {
        value: 25,
        name: 'invisible',
        itemStyle: {
          color: '#E1E8EE'
        }
      }]
    }]
  }
}
